package com.example.springmavcase;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLOutput;

/**
 * Created with Intellij IDEA.
 * Description;
 * User:TQ02
 * Data:2023-10-27
 * Time:17:08
 * Text：
 */

@RequestMapping("/calc")
@RestController
public class calculator {
    @RequestMapping("/sum")
    public String sum(Integer num1,Integer num2){
        System.out.println("1234");
        Integer sum=num1+num2;
        return "计算结果为："+sum;
    }
}
